import Vue from 'vue'
import VueRouter from 'vue-router'
import Content from "../components/Content";
import Main from "../components/Main";
import My from "../components/My";
import NotFound from "../components/NotFound";
import ListData from "../components/ListData";
import LongListData from "../components/LongListData";

//安装路由
Vue.use(VueRouter);


//配置导出路由
export default new VueRouter({
  mode: 'history',
  routes: [
    {
      //路由路径
      path: '/longListData',
      //路由名称
      name: 'longListData',
      //跳转的组件
      component: LongListData
    },
    {
      //路由路径
      path: '/listData',
      //路由名称
      name: 'listData',
      //跳转的组件
      component: ListData
    },
    {
      //路由路径
      path: '/content',
      //路由名称
      name: 'content',
      //跳转的组件
      component: Content
    },
    {
      //路由路径
      path: '/main',
      //路由名称
      name: 'main',
      //跳转的组件
      component: Main
    },
    {
      //路由路径
      path: '/my',
      //路由名称
      name: 'my',
      //跳转的组件
      component: My
    },
    {
      //路由路径
      path: '*',
      //路由名称
      name: '/404',
      //跳转的组件
      component: NotFound
    }
  ]
})
